<script setup>
	import {
		ref
	} from 'vue';

	const num = ref()
	const color = ref('#fff')
	const onAdd = function(e) {
		console.log(e);
		num.value = e
		color.value = '#' + String(e).substring(3, 7)
	}
	
		const size = ref(12)
	const onChange = function(e) {
		 size.value=e;
	}

</script>
<template>
	<view>
		<uni-icon @add="onAdd" @change="onChange"></uni-icon>
		<view class="box" :style="{background:color,fontSize:size+'px'}">number:{{num}}</view>
	</view>

</template>
<style lang="scss" scoped>
	.box {
		width: 200px;
		height: 200px;
	}
</style>